<?php
	require_once("../conexion/conexion.php");
	$cod = $_GET['num'];
	
	$con = new Conexion();
    $con2 = $con->conexionBD("fpproduccion");
    $sql = "select 
				date_format(BodCFecha,'%d-%m-%Y'),
				ProvNombre,
				ProObs,
				ProCantidad,
				ProUnitario,
				ProTotal,
				ProNombre
				
				from bodegacentral
				inner join proveedor on
				proveedor.provrut=bodegacentral.provrut
				inner join producto on
				producto.procod=bodegacentral.procod
		where BodCCod='".$cod."'";
    $res = mysql_query($sql) or die ($con->error_mysql("Error en la consulta".mysql_error()));
	$datos =   mysql_fetch_array($res);
	$con->cerrarBD();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Detalle - Producto</title>
<link href="../Estilos/global.css" rel="stylesheet" type="text/css" />
<link href="../Estilos/local.css" rel="stylesheet" type="text/css" />
<link href="../Estilos/CssTabla3.css" rel="stylesheet" type="text/css" />

<script src="../include_js/jquery.js" type="text/javascript"></script>
<script src="../include_js/popcalendar.js" type="text/javascript"></script>
<style>
.texto
{
	font-size:14px;
	margin-left:8px;
	font:Verdana, Arial, Helvetica, sans-serif; 
	color:#0066CC;
}
.borde
{
	/*border:0px solid #6593C0;*/
	border:1px solid #D3E4E5;
}
.bordeA {	/*border:0px solid #6593C0;*/
	border:1px solid #D3E4E5;
}
</style>
<script>
function Cerrar()
{
	window.close();
}
</script>
</head>

<body>
<br class="end" />
<div id="area">
 <div id="navbar">
    	<div class="righty"></div>
        <div class="lefty"></div>
		<ul>
            <li><label style="font-size:12px;">Detalle  Producto (<?php echo $datos[6];?>)</label></li>
		</ul>
 </div>
 <div id="content">
<form name="form_PSMB" id="form_PSMB" method="post">
<table width="100%" cellpadding="2" cellspacing="0" border="0" class="uno">
<tr>
  <td width="24%" class="borde">&nbsp;</td>
  <td width="30%" class="borde">&nbsp;</td>
  <td width="17%" class="borde">&nbsp;</td>
  <td width="29%" class="borde">&nbsp;</td>
</tr>
<tr>
  <td class="borde" style="text-align:right"><label class="texto">C&oacute;digo:</label></td>
  <td class="borde"><input type="text" name="textfield" value="<?php echo $cod;?>" readonly="true" style="background:#E1E1E1" /></td>
  <td class="borde" style="text-align:right"><label class="texto">V. Unitario:</label></td>
  <td class="borde"><input type="text" name="textfield5" readonly="true" style="background:#E1E1E1" value="<?php echo number_format ($datos[4],0,',','.');?>"/></td>
</tr>
<tr>
  <td class="borde" style="text-align:right"><label class="texto">Fecha Ingreso:</label></td>
  <td class="borde"><input type="text" name="textfield2" readonly="true" style="background:#E1E1E1" value="<?php echo $datos[0]?>"/></td>
  <td class="borde" style="text-align:right"><label class="texto">V. Total:</label></td>
  <td class="borde"><input type="text" name="textfield6" readonly="true" style="background:#E1E1E1" value="<?php echo number_format ($datos[5],0,',','.');?>"/></td>
</tr>
<tr>
  <td class="borde" style="text-align:right"><label class="texto">Cantidad:</label></td>
  <td class="borde"><input type="text" name="textfield4" readonly="true" style="background:#E1E1E1" value="<?php echo $datos[3]?>"/></td>
  <td class="borde" style="text-align:right">&nbsp;</td>
  <td class="borde">&nbsp;</td>
</tr>
<tr>
  <td class="borde" style="text-align:right"><label class="texto">Proveedor:</label></td>
  <td class="borde" colspan="2"><input type="text" name="textfield3" readonly="true"  size="48" style="background:#E1E1E1" value="<?php echo $datos[1]?>"/></td>
  <td class="borde">&nbsp;</td>
</tr>

<tr>
  <td class="borde" style="text-align:right"><label class="texto">Observaci&oacute;n:</label></td>
  <td class="borde" colspan="3"><textarea name="txtObs" cols="50" rows="3" readonly="true" style="background:#E1E1E1"><?php echo $datos[2]?></textarea></td>
</tr>
<tr>
  <td class="borde">&nbsp;</td>
  <td class="borde">&nbsp;</td>
  <td class="borde">&nbsp;</td>
  <td class="borde">&nbsp;</td>
</tr>
<tr>
  <td class="borde" colspan="4" style="text-align:center"><input type="button" name="btn_Cancelar" id="btn_Cancelar" value="Cerrar" onclick="Cerrar();" /></td>
</tr>
<tr>
  <td class="borde">&nbsp;</td>
  <td class="borde">&nbsp;</td>
  <td class="borde">&nbsp;</td>
  <td class="borde">&nbsp;</td>
</tr>
</table>
</form>
 </div>
 <div id="close">
    	<div class="righty"></div>
    	<div class="lefty"></div>
 </div>
</div>
</body>
</html>
